#ifndef QENTERPIN_H
#define QENTERPIN_H

#include <QtGui/QWidget>
#include <QtGui/QPainter>
#include <QtGui/QBitmap>

#include "ui_qenterpin.h"

class QEnterPIN : public QWidget
{
    Q_OBJECT

public:
    QEnterPIN(QWidget *parent = 0);
    ~QEnterPIN();

 typedef enum { PIN=0, PUK } WND_TYPE;

    void paintEvent(QPaintEvent*);

    QString& getPINcode();

    void setType( WND_TYPE type ){ type_= type; };
    bool isPIN(){
    	if ( type_== PIN ) return true;
			else
				return false;
	};
    bool isPUK(){
    	if ( type_== PUK ) return true;
			else
				return false;
    };

    QFrame * balanceState_;

    QLineEdit * getLEPinCode();

public slots:
	void OnOkEnterPIN();
	void update();

private:
    Ui::QEnterPINClass ui;

    QString PINcode;
    QString PUKcode;
    WND_TYPE type_;
};

#endif // QENTERPIN_H
